/**
  ETFRoot project, Anyang Normal University && IMP-CAS
  \class ETFTimer
  \brief To represent any type of timing detectors
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2022-04-26
  \date 2022-04-26 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2022-04-26   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2022 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFTimer_h
#define ETFTimer_h

#include "ETFDetector.h"

class TClonesArray;
class ETFPlaHit;

class ETFTimer : public ETFDetector{
public:
  ETFTimer() : ETFDetector(){}
  ETFTimer(const char *name);
  virtual ~ETFTimer();

  virtual void Initialize(); ///< initialize the detector
  virtual void Register(); ///< register hits to the main output tree

  /// get the timing signal of Tstart
  virtual double GetTime() const = 0;
  virtual int GetFiredStatus() const = 0;
  TClonesArray *GetHits() const{ return fHits; }
  virtual void Print(); ///< print the detector info

  ClassDef(ETFTimer, 1);

protected:
  TClonesArray *fHits; //-> ///< an array of plastic hits, supposed to hold <= 1 hits
};

#endif
